<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/vue.js"></script>
    <script src="lib/vue-resource.js"></script>
    <script src="lib/vuex.js"></script>
    <!--<script src="js/vuex-demo.js"></script>-->
</head>
<body>

<div id="app">

    {{message}}

    <my-com></my-com>
</div>


</body>
<script>

    import hello from 'Hello.vue'

    /*var hello = {

        template:'<div>123456789</div>',


    };*/

    /*const state = {
        count: 0
    };

    const mutations = {
        INCREMENT (state) {
            state.count++
        }
    };

    export default new Vuex.Store({
        state,
        mutations
    })*/


    const app = new Vue({

        el: '#app',

        data: {
            message: 'Hello Vue!'
        },
        created:function(){
            this.cartView()
        },
        methods:{
            cartView:function(){
                this.$http.get('lib/data.json').then(function(res){
                    console.log(res.body);
                })
            }
        },
        components:{
            'my-com':hello,
        }
    })

</script>
</html>








